package hl.demosample.app.weight.jellyInerpolator;

import android.view.animation.LinearInterpolator;

/*
 * path: Download
 * Author: 86133
 * Create: 2021-05-27 15:39
 * Changes (from 2021-05-27)
 * Desc:
 */
public class JellyInterpolator extends LinearInterpolator {

    private float factor;

    public JellyInterpolator() {
      this.factor = 0.15f;
    }

   @Override
   public float getInterpolation(float input) {
       return (float) (Math.pow(2, -10 * input)
          * Math.sin((input - factor / 4) * (2 * Math.PI) / factor) + 1);

    }

}
